﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="HappyCourseRegForm.aspx.cs" Inherits="App_Input_HappyCourseRegForm"  Title="亲和学堂报名"%>
<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script type="text/javascript">
function change(obj)
{

    //会员
    if(obj.value == "01")
    {
        document.getElementById('<%=txtName.ClientID%>').value="";
        document.getElementById('<%=txtName.ClientID%>').disabled=true; 
        
        document.getElementById('<%=txtMemberNo.ClientID%>').disabled=false;   
        document.getElementById('<%=txtName.ClientID%>').style.backgroundColor="#E0E0E0";
        document.getElementById('<%=txtMemberNo.ClientID%>').style.backgroundColor="";
        document.getElementById('<%=searchImg.ClientID%>').style.display="block";
        
    }
    else
    {

        document.getElementById('<%=searchImg.ClientID%>').style.display="none";
        document.getElementById('<%=txtMemberNo.ClientID%>').value="";
        document.getElementById('<%=txtMemberName.ClientID%>').value="";
        document.getElementById('<%=txtName.ClientID%>').disabled=false;  
        document.getElementById('<%=txtMemberNo.ClientID%>').disabled=true;  
        document.getElementById('<%=txtName.ClientID%>').style.backgroundColor="";
        document.getElementById('<%=txtMemberNo.ClientID%>').style.backgroundColor="#E0E0E0";
    }

         }


</script>
    <asp:MultiView ID="MultiView1" runat="server">

        <asp:View ID="View1" runat="server">
            <cc1:ComValidator ID="ComValidator1" runat="server">
     <cc1:CheckLongAttribute Code="E0322" ControlToValidator="txtTeacherId">
        <cc1:ComAbsParamsAttribute Parameter="授课教师" />
    </cc1:CheckLongAttribute>
    </cc1:ComValidator>
            <table class="table_border_line">
                <tr>
                    <td align="left">

                        <script language="javascript" type="text/javascript">
                                        (new TitleBar('SearchBar', ' 检索条件')).showBar();
                        </script>

                    </td>
                </tr>
            </table>
            <table class="table_border_line">
                <tr>
                    <td style="width: 145px; height: 43px">
                    </td>
                    <td style="width: 106px; height: 43px">
                        课程名称：
                    </td>
                    <td style="width: 224px; height: 43px">
                        <asp:TextBox ID="txtCurriculmName" runat="server" Width="100px"></asp:TextBox></td>
                    <td style="width: 111px; height: 43px">
                        课程分类：
                    </td>
                    <td style="height: 43px">
                        <asp:DropDownList ID="dropCurriculmType" runat="server" Width="106px" DataTextField="Content" DataValueField="DictNo">
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td style="width: 145px; height: 41px">
                    </td>
                    <td style="width: 106px; height: 41px">
                        授课教师：</td>
                    <td style="width: 224px; height: 41px">
                    <asp:TextBox ID="txtTeacherId" runat="server" MaxLength="4" Width="88px"></asp:TextBox>
                    <asp:TextBox ID="txtTeacherName" runat="server" BackColor="#E0E0E0" BorderColor="#E0E0E0"
                                contentEditable="false" ForeColor="Black" Width="89px"></asp:TextBox><a href="#" onclick="javascript:openPersonSrh(1);">
                                <img id="Img1" runat="server" src="../../images/search.jpg" border="0" />
                            </a>
                       </td>
                    <td style="width: 111px; height: 41px">
                        开课日期：</td>
                    <td style="height: 41px">
                        <asp:TextBox ID="txtBeginDate" runat="server" Width="101px" onfocus="new Calendar().show(this);"></asp:TextBox>～
                        <asp:TextBox ID="txtEndDate" runat="server" Width="101px" onfocus="new Calendar().show(this);"></asp:TextBox></td>
                </tr>
                <tr>
                    <td style="width: 145px; height: 41px">
                    </td>
                    <td align="right" colspan="3" style="height: 41px">
                        <asp:Button ID="btn_Search" runat="server" CssClass="button" OnClick="btn_Search_Click"
                            Text="检 索" Width="84px" /></td>
                    <td style="height: 41px">
                    </td>
                </tr>
            </table>
            <table class="table_border_line">
                <tr>
                    <td align="left">

                        <script language="javascript" type="text/javascript">
                                        (new TitleBar('SearchBar', ' 检索结果')).showBar();
                        </script>

                    </td>
                </tr>
            </table>
            <table class="table_border_line">
                <tr>
                    <td>
                        <asp:GridView ID="GridView1" runat="server" CssClass="GridView_table" AutoGenerateColumns="False" OnPageIndexChanging="GridView1_PageIndexChanging" Width="100%"
                            BorderWidth="0px" AllowPaging="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="CurriculumId">
                            <Columns>
                                <asp:BoundField HeaderText="序号">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="课程名称" DataField="CurriculumName">
                                    <ItemStyle CssClass="GridView_item_left"  />
                                    <HeaderStyle CssClass="GridView_head_grayblue" Width="20%" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="开课时间" DataField="BeginDate" DataFormatString="{0:yyyy/MM/dd}" HtmlEncode = "False">
                                    <ItemStyle CssClass="GridView_item_center"  />
                                    <HeaderStyle CssClass="GridView_head_grayblue" Width="20%" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="授课教师" DataField="">
                                    <ItemStyle CssClass="GridView_item_left"  />
                                    <HeaderStyle CssClass="GridView_head_grayblue" Width="20%" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="招生人数" DataField="curriculumCount">
                                    <ItemStyle CssClass="GridView_item_left"  />
                                    <HeaderStyle CssClass="GridView_head_grayblue" Width="20%" />
                                </asp:BoundField>
                                <asp:CommandField ButtonType="Image" HeaderText="明细" SelectImageUrl="~/images/edit.jpg"
                                    SelectText="" ShowSelectButton="True">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                                </asp:CommandField>
                            </Columns>
                            <PagerStyle HorizontalAlign="Right" VerticalAlign="Middle" />
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </asp:View>
        <asp:View ID="View2" runat="server">
           
            <table class="table_border_line">
                <tr>
                    <td align="left">

                        <script language="javascript" type="text/javascript">
                                        (new TitleBar('SearchBar', ' 课程信息')).showBar();
                        </script>

                    </td>
                </tr>
                <tr>
                    <td >
<table width="100%">
                <tr>
                    <td style="height: 16px; width: 82px;">
                    </td>
                    <td style="height: 16px; width: 145px;" >
                        课程编号：
                    </td>
                    <td style="height: 16px; width: 140px;" >
                        <asp:Label ID="labCurriculumId" runat="server"></asp:Label></td>
                    <td style="width: 340px; height: 16px" >
                    </td>
                    <td style="height: 16px" >
                        </td>
                </tr>
                <tr>
                    <td style="height: 16px; width: 82px;" >
                    </td>
                    <td style="height: 16px; width: 145px;">
                        课程名称：</td>
                    <td style="height: 16px; width: 140px;" >
                        <asp:Label ID="labCurriculumName" runat="server"></asp:Label></td>
                    <td style="height: 16px; width: 340px;" >
                        招生人数：<asp:Label ID="labCount" runat="server"></asp:Label></td>
                        <td style="height: 16px" >
                    </td>
                </tr>
                <tr>
                    <td style="width: 82px; height: 15px" >
                    </td>
                    <td style="width: 145px; height: 15px" >
                        授课老师：</td>
                    <td style="width: 140px; height: 15px" >
                        <asp:Label ID="labTeacher" runat="server"></asp:Label></td>
                    <td style="width: 340px; height: 15px;" >
                        招生对象：<asp:Label ID="labObject" runat="server"></asp:Label></td>
                    <td style="height: 15px" >
                    </td>
                </tr>
                <tr>
                    <td style="width: 82px; height: 17px;" >
                    </td>
                    <td style="width: 145px; height: 17px;" >
                        开课日期：</td>
                    <td style="width: 140px; height: 17px;" >
                        <asp:Label ID="labDate" runat="server"></asp:Label></td>
                    <td style="width: 340px; height: 17px;" >
                        开课地点：<asp:Label ID="labAddress" runat="server"></asp:Label></td>
                    <td style="height: 17px" >
                    </td>
                </tr>
                <tr>
                    <td style="width: 82px" >
                    </td>
                    <td style="width: 145px" >
                        联 系 人：</td>
                    <td style="width: 140px">
                        <asp:Label ID="labContact" runat="server"></asp:Label></td>
                    <td style="width: 340px" >
                        联系电话：<asp:Label ID="labPhone" runat="server"></asp:Label></td>
                    <td >
                    </td>
                </tr>
                <tr>
                    <td style="width: 82px" >
                    </td>
                    <td style="width: 145px" >
                        学费（含材料费）：</td>
                    <td style="width: 140px" >
                        <asp:Label ID="labFee" runat="server"></asp:Label></td>
                    <td style="width: 340px" >
                    </td>
                    <td >
                    </td>
                </tr>
                <tr>
                    <td style="width: 82px; height: 141px;" >
                    </td>
                    <td style="width: 145px; height: 141px;" >
                        授课内容：</td>
                    <td colspan="3" style="height: 141px">
                        <asp:TextBox ID="txtContent" runat="server" ReadOnly="true" Height="139px" TextMode="MultiLine" Width="684px"></asp:TextBox></td>
                   
                </tr>
            </table>
                    </td>
                </tr>
                <tr>
                    <td align="left">

                        <script language="javascript" type="text/javascript">
                                        (new TitleBar('SearchBar', ' 学员情况')).showBar();
                        </script>

                    </td>
                </tr>
                <tr>
                    <td align="left">

                       <asp:GridView ID="GridView2" runat="server" CssClass="GridView_table" AutoGenerateColumns="False" OnRowDataBound="GridView2_RowDataBound"
                            DataKeyNames="StudentId" OnPageIndexChanging="GridView2_PageIndexChanging" OnRowDeleting="GridView2_OnRowDeleting"
                            OnSelectedIndexChanged="GridView2_SelectedIndexChanged" Width="100%"
                            BorderWidth="0px" AllowPaging="True">
                            <Columns>
                                <asp:BoundField HeaderText="序号" DataField="">
                                    <ItemStyle CssClass="GridView_item_center" Width="10%" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="姓名" DataField="NameC">
                                    <ItemStyle CssClass="GridView_item_center" Width="20%" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="性别" DataField="SexTxt">
                                    <ItemStyle CssClass="GridView_item_center" Width="20%" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="是否会员" DataField="">
                                    <ItemStyle CssClass="GridView_item_center" Width="20%" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="是否学员" DataField="">
                                    <ItemStyle CssClass="GridView_item_center" Width="20%" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>
                                <asp:CommandField ButtonType="Image" HeaderText="明细" SelectImageUrl="~/images/edit.jpg"
                                    SelectText="" ShowSelectButton="True">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" Width="5%" />
                                </asp:CommandField>
                                 <asp:TemplateField HeaderText="删除" ShowHeader="False">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" Width="5%" />
                                    <ItemTemplate>
                                        <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                            ImageUrl="~/images/delete.jpg" Text="" OnClientClick="return confirm('确定删除吗？')" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <PagerStyle HorizontalAlign="Right" VerticalAlign="Middle" />
                        </asp:GridView>

                    </td>
                </tr>
                <tr>
                    <td align="left">

                        <script language="javascript" type="text/javascript">
                                        (new TitleBar('SearchBar', ' 报名信息')).showBar();
                        </script>

                    </td>
                </tr>
                <tr>
                    <td  style=" width:100%">

                         <table class="table_border_line" width="100%">
                
                <tr>
                    <td style="width: 149px; height: 30px;" >
                    </td>
                    <td style="width: 108px; height: 30px;" >
                        学员编号：</td>
                    <td style="width: 167px; height: 30px;">
                        <asp:Label ID="labStudentId" runat="server" Text=""></asp:Label>
                    </td>
                    <td style="width: 818px; height: 30px">
                    </td>
                </tr>
                <tr>
                    <td style="width: 149px; height: 30px" >
                    </td>
                    <td style="width: 108px; height: 30px" >
                        会员编号：</td>
                    <td style="width: 167px; height: 30px"  align="right">
                        <asp:TextBox ID="txtMemberNo" runat="server" MaxLength="12" Width="89px"></asp:TextBox>
                        <asp:TextBox ID="txtMemberName" runat="server" BackColor="#E0E0E0" BorderColor="#E0E0E0"
                            contentEditable="false" ForeColor="Black" Width="72px"></asp:TextBox></td>
                    <td style="width: 818px; height: 30px" align="left">
                    <a href="#" onclick="javascript:popupMemberSearch('<%=txtMemberNo.ClientID%>', '<%=txtMemberName.ClientID %>' );">
                            <img id="searchImg" runat="server" border="0" src="../../images/search.jpg" />
                            </a></td>
                </tr>
                <tr>
                    <td style="width: 149px; height: 29px;" >
                    </td>
                    <td style="width: 108px; height: 29px;" >
                        姓 名：</td>
                    <td style="width: 167px; height: 29px;">
                        <asp:TextBox ID="txtName" runat="server" Width="164px"  ></asp:TextBox></td>
                    <td style="width: 818px; height: 29px">
                    </td>
                </tr>
                <tr>
                    <td style="width: 149px; height: 30px;" >
                    </td>
                    <td style="width: 108px; height: 30px;" >
                        性 别：</td>
                    <td style="width: 167px; height: 30px;" >
                        <asp:RadioButtonList ID="radSex" runat="server" RepeatDirection="Horizontal" Height="11px">
                            <asp:ListItem Value="01" Selected="True">男</asp:ListItem>
                            <asp:ListItem Value="02">女</asp:ListItem>
                        </asp:RadioButtonList></td>
                    <td style="width: 818px; height: 30px">
                    </td>
                </tr>
                <tr>
                    <td style="width: 149px; height: 30px;" >
                    </td>
                    <td style="width: 108px; height: 30px;">
                        年 龄：</td>
                    <td style="width: 167px; height: 30px;" >
                        <asp:TextBox ID="txtAge" runat="server" MaxLength="3" Width="49px"></asp:TextBox></td>
                    <td style="width: 818px; height: 30px">
                    </td>
                </tr>
                <tr>
                    <td style="width: 149px; height: 28px;" >
                    </td>
                    <td style="width: 108px; height: 28px;" >
                        联系电话：</td>
                    <td style="width: 167px; height: 28px;" >
                        <asp:TextBox ID="txtPhone" runat="server" Width="167px"></asp:TextBox></td>
                    <td style="width: 818px; height: 28px">
                    </td>
                </tr>
                <tr>
                    <td style="width: 149px; height: 30px;" >
                    </td>
                    <td style="width: 108px; height: 30px;" >
                        课堂职务：</td>
                    <td style="width: 167px; height: 30px;" >
                        <asp:TextBox ID="txtStatus" runat="server" Width="166px"></asp:TextBox></td>
                    <td style="width: 818px; height: 30px">
                    </td>
                </tr>
                <tr>
                    <td style="width: 149px; height: 39px;" >
                    </td>
                    <td style="width: 108px; height: 39px;" >
                        报名类型：</td>
                    <td style="width: 167px; height: 39px;" >
                        <asp:RadioButtonList ID="radType" runat="server" RepeatDirection="Horizontal" >
                            <asp:ListItem Value="01" Selected="True" onclick="change(this)">会员</asp:ListItem>
                            <asp:ListItem Value="02" onclick="change(this)">非会员</asp:ListItem>
                        </asp:RadioButtonList></td>
                    <td style="width: 818px; height: 39px">
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="4" style="height: 48px">
                        <asp:Button ID="btn_New" runat="server" Text="新 建" CssClass="button" Width="91px" OnClick="btn_New_Click" />
                        <asp:Button ID="btn_Ok" runat="server" Text="报 名" CssClass="button" Width="91px" OnClick="btn_Ok_Click" OnClientClick="return confirm('是否报名?')"/>
                        <asp:Button ID="btn_Back" runat="server" Text="返 回" CssClass="button" Width="92px" OnClick="btn_Back_Click" /></td>
                </tr>
                </table>
                    </td>
                </tr>
                </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>
